import React, { Component } from 'react'
import Header from '../../../common/shopHeader';
import { connect } from 'react-redux';
import {fromJS} from 'immutable';
import DetailInfo from './compoments/DetailInfo/index';
import Buy from './compoments/buy'
import { StickyContainer, Sticky } from 'react-sticky';
import LoadMore from '../../../common/loadMore'
import { getshoplikeList } from "../../../apis/shop";
import AdListUl from "./compoments/comment/commentUl";
class ShopDetails extends Component {
    render() {
        let id=this.props.match.params
        return (
            <StickyContainer>
                <Sticky>
                    {({ style }) => {  return <div style={{ ...style, zIndex: 1 }}> <Header title={"商品详情"} /></div> }}
                </Sticky>
                <DetailInfo id={id}/>
                <Buy id={id}/>
                <LoadMore config={{header:"评论"}} {...this.props} params={{id}} ShowListUl={AdListUl} httpDatas={getshoplikeList} />
            </StickyContainer>
        )
    }
}
const mapStateToProps = (state, ownProps) => {
    state= fromJS(state);
    return {
    };
};
const mapDispatchToProps = (dispatch, ownProps) => {
    return {
    };
};
export default connect(mapStateToProps, mapDispatchToProps)(ShopDetails);
